package com.company.project.controller.ldjsc.home;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.company.project.entity.ldjsc.home.JscJcbgXqEntity;
import com.company.project.entity.ldjsc.home.JscJjyxZbkdTwoEntity;
import com.company.project.service.ldjsc.home.JscJcbgXqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import java.util.*;

import com.company.project.common.utils.DataResult;




/**
 *
 *
 * @author wenbin
 * @email *****@mail.com
 * @date 2025-08-11 18:08:24
 */
@Controller
@RequestMapping("/sxzy")
public class JscJcbgXqController {
    @Autowired
    private JscJcbgXqService jscJcbgXqService;


    @ApiOperation(value = "监测报告-详情1")
    @GetMapping("/jsc-dd-zt/JscJcbgXq12")
    @ResponseBody
    public DataResult findListByPage(JscJcbgXqEntity jscJcbgXqEntity){

        JscJcbgXqEntity jcbgXqEntity = jscJcbgXqService.getById(jscJcbgXqEntity.getId());

        List<JscJcbgXqEntity> jscJcbgXqEntities = new ArrayList<>();
        jscJcbgXqEntities.add(jcbgXqEntity);

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "title",
                "source_from",
                "content_url",
                "image_url",
                "vedio_url",
                "state",
                "create_time",
                "creator",
                "update_user",
                "update_time",
                "publish_time",
                "publisher",
                "type_code",
                "type_name",
                "dept_name",
                "dept_code",
                "index_code",
                "index_name",
                "month",
                "type_id",
                "show_main_page",
                "prefix_title",
                "is_new",
                "new_sq",
                "main_sq",
                "type_sq",
                "sort"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", jscJcbgXqEntities);

        return DataResult.success(result);
    }

}
